﻿using RpcCentral.Common;
using SqlSugarHelper;

namespace RpcCentral.Service
{
    internal class SqlSugarContainer : IUnityContainer
    {
        public void Register(Type form, Type to)
        {
            UnityHelper.Register(form, to);
        }

        public void Register<Form, To>()
        {
            UnityHelper.Register(typeof(Form), typeof(To));
        }

        public void RegisterSingle<T>(T to)
        {
            UnityHelper.RegisterSingle(to);
        }

        public void RegisterSingle<Form, To>()
        {
            UnityHelper.RegisterSingle(typeof(Form), typeof(To));
        }

        public T Resolve<T>()
        {
            return UnityHelper.Resolve<T>();
        }
    }
}
